//
//  HMSportMianViewController.m
//  BlackHorseLine
//
//  Created by made on 17/3/5.
//  Copyright © 2017年 made. All rights reserved.
//

#import "HMSportMianVC.h"
#import "HMSportSportingVC.h"

@interface HMSportMianVC ()

@property(nonatomic,weak) IBOutlet UIButton *item;

@end

@implementation HMSportMianVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSLog(@"%@",self.item.nextResponder);
    NSLog(@"%@",self.item.nextResponder.nextResponder);
    NSLog(@"%@",self.item.nextResponder.nextResponder.nextResponder);
    NSLog(@"%@",self.item.nextResponder.nextResponder.nextResponder.nextResponder);
    NSLog(@"%@",self.item.nextResponder.nextResponder.nextResponder.nextResponder.nextResponder);
    NSLog(@"%@",self.item.nextResponder.nextResponder.nextResponder.nextResponder.nextResponder.nextResponder);

    
}




- (IBAction)sportButtonClick:(UIButton *)sender {
    
    NSLog(@"%ld",sender.tag);
    
    //创建运动监控模型
    //HMSportSportingVC *sportingVC = [[HMSportSportingVC alloc] init];
    
    //获取storyboard中的控制器
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Sport" bundle:nil];
    //identifier:控制器在storyboard中的storyboard ID
    HMSportSportingVC *sportingVC = [storyboard instantiateViewControllerWithIdentifier:@"HMSportSportingVC"];
    //设置运动类型
    sportingVC.sportType = sender.tag;
    
    [self presentViewController:sportingVC animated:YES completion:nil];
}






@end
